package com.blb.zy_community.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.blb.zy_community.entity.SysPost;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.List;

/**
 * <p>
 * 岗位信息表 Mapper 接口
 * </p>
 *
 * @author 二组
 * @since 2023-06-18
 */
public interface SysPostMapper extends BaseMapper<SysPost> {
Page<SysPost> selectPostPage(Page<?> page,String postName,String postCode,String status);

    @Select("select * from sys_post where post_id=#{postId}")
    List<SysPost> selectPostList(long postId);

    void deletePost(Long[] postIds);

    /**
     * 通过用户名查询角色集合
     * @param userId
     * @return
     */
    List<SysPost> selectByUserId(Long userId);
}
